#ifndef BALL_H
#define BALL_H

#include "cv.h"

class ball
{
    public:
    ball(int width, int height);
	void draw(IplImage *img);
    void updatePositionandDraw (IplImage* img);
    void bounce();
    int getX() const;
	int getY() const;
	void init(int x,int y, int a);
	int getR() const;
    bool isHitLeft();
    bool isHitRight();
	int displacementX;
	int displacementY;
	void calculateDisplacementX(int angle, int speed);
	void calculateDisplacementY(int angle, int speed);
    private:
    int x,y,radius, xspeed, yspeed, width, height;
    int angle;
    bool HitLeft, HitRight;
};

#endif